<template>
  <layout>
    <div slot="body" style="font-size:150%">

      <el-breadcrumb separator="/">
        <el-breadcrumb-item :to="{ path: '/TaskInstanceDetailsView?id='+instance.id }">{{instance.name}}</el-breadcrumb-item>
        <el-breadcrumb-item>{{step.name}}</el-breadcrumb-item>
      </el-breadcrumb>

      <h1>步骤执行历史</h1>
    </div>
    <div slot="body">
      <task-instance-table></task-instance-table>
    </div>
  </layout>
</template>

<script>
  import Layout from "@/components/layout_schedulex/layout"
  import TaskInstanceTable from "@/components/schedulex/TaskInstanceExecuteListTable"
  import {api, getRequest} from "@/api/commit";


  export default {
    name: "TaskInstanceExecuteListTable",

    components: {
      Layout,
      TaskInstanceTable
    },
    data() {
        return {
          step: {
            id:0,
            name:""
          },
          instance: {
             id: 0,
             name: ""
           }
        }
      },
    methods: {
      init_data() {
          let params = {
            "id": this.$route.query.id
          }
          getRequest(api['step_get_data'],params).then((res) => {
            res = res.resultReturn
            this.step= res.step
            this.instance= res.instance
          }, (error) => {
            console.info(error)
          })
        },
    },created () {
        this.init_data()
      }
  }
</script>

<style scoped>

</style>
